using System;

namespace AutoStartManager.Models
{
    /// <summary>
    /// 管理的应用程序信息
    /// </summary>
    public class ManagedApp
    {
        /// <summary>
        /// 应用程序名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 启动程序路径
        /// </summary>
        public string ExecutablePath { get; set; } = string.Empty;

        /// <summary>
        /// 启动参数
        /// </summary>
        public string Arguments { get; set; } = string.Empty;

        /// <summary>
        /// 工作目录
        /// </summary>
        public string WorkingDirectory { get; set; } = string.Empty;

        /// <summary>
        /// 是否启用监控
        /// </summary>
        public bool IsEnabled { get; set; } = true;

        /// <summary>
        /// 进程ID（运行时）
        /// </summary>
        public int ProcessId { get; set; } = 0;

        /// <summary>
        /// 最后检查时间
        /// </summary>
        public DateTime LastChecked { get; set; } = DateTime.Now;

        /// <summary>
        /// 是否正在运行
        /// </summary>
        public bool IsRunning { get; set; } = false;

        public override string ToString()
        {
            return $"{Name} - {ExecutablePath}";
        }
    }
}